//
//  LMhero.m
//  11lol英雄
//
//  Created by 张青花 on 15/7/30.
//  Copyright (c) 2015年 李明. All rights reserved.
//

#import "LMhero.h"

@implementation LMhero



- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

+ (instancetype)heroWithDic:(NSDictionary *)dic
{
    return [[self alloc] initWithDic:dic];
}

+ (NSArray *) heroTOlist
{
    NSString *str = [[NSBundle mainBundle] pathForResource:@"heros" ofType:@"plist"];
    
    NSArray *array = [NSArray arrayWithContentsOfFile:str];
    
    NSMutableArray *marray = [NSMutableArray array];
    for (NSDictionary *dic in array) {
        LMhero *hero = [LMhero heroWithDic:dic];
        [marray addObject:hero];
    }
    
    return marray;
}




@end
